import { data } from 'autoprefixer';
import request from '/@/utils/request';

export const deptTree = (data?: Object) => {
	return request({
		url: '/admin/V1/dept/tree',
		method: 'post',
		data,
	});
};

export const deptId = (data?: Object) => {
	return request({
		url: '/admin/V1/dept/id',
		method: 'post',
		data,
	});
};

export const addObj = (obj: Object) => {
	return request({
		url: '/admin/V1/dept/add',
		method: 'post',
		data: obj,
	});
};

export const getObj = (data: Object) => {
	return request({
		url: '/admin/V1/dept/id',
		method: 'post',
		data: data,
	});
};

export const delObj = (data: Object) => {
	return request({
		url: '/admin/V1/dept/deleted',
		method: 'post',
		data: data,
	});
};

export const putObj = (obj: Object) => {
	return request({
		url: '/admin/V1/dept/update',
		method: 'post',
		data: obj,
	});
};

export const syncUser = () => {
	return request({
		url: '/admin/V1/connect/sync/ding/user',
		method: 'post',
	});
};

export const syncDept = () => {
	return request({
		url: '/admin/V1/connect/sync/ding/dept',
		method: 'post',
	});
};

export const syncCpUser = () => {
	return request({
		url: '/admin/V1/connect/sync/cp/user',
		method: 'post',
	});
};

export const syncCpDept = () => {
	return request({
		url: '/admin/V1/connect/sync/cp/dept',
		method: 'post',
	});
};
